import request from "@/utils/request";

// 查询列表
export function getTree(data) {
  return request({
    url: "/base/org/tree?id=" + data,
    method: "get",
  });
}
export function getTableList(data) {
  return request({
    url: "/business/collect/list",
    method: "get",
    params: data,
  });
}
// 项目列表
export function getTree1(data) {
  return request({
    url: "/base/org/dept/tree/" + data,
    method: "get",
  });
}
// add List
export function addList(data) {
  return request({
    url: "/base/org/add",
    method: "post",
    data: data,
  });
}
// update List
export function updateList(data) {
  return request({
    url: "/base/org/update",
    method: "post",
    data: data,
  });
}
// delete List
export function deleteList(data) {
  return request({
    url: "/base/org/del?id=" + data,
    method: "post",
  });
}

// 项目列表
export function searchOptionList(data) {
  return request({
    url: "/dict/major/list",
    method: "get",
    params: data,
  });
}
// 承包商列表
export function getDataList(data) {
  return request({
    url: "auth/authority/user/getUser/" + data,
    method: "get",
    data: data,
  });
}
// 详情
export function detail(data) {
  return request({
    url: "sg-cbs-business-daily/daily/problemRectification/detail?id=" + data,
    method: "get",
  });
}
//
export function remoteMethodIllegalUser(data) {
  return request({
    url: "/auth/authority/user/list",
    method: "get",
    params: data,
  });
}
//
export function jiesuo(data) {
  return request({
    url: "auth/authority/user/unLocked/" + data,
    method: "put",
  });
}
//
export function addOk1(data) {
  return request({
    url: "/sg-cbs-business-daily/daily/problemRectification/approval",
    method: "post",
    data: data,
  });
}
//
//
export function addOk2(data) {
  return request({
    url: "/sg-cbs-business-daily/daily/problemRectification/rectification",
    method: "post",
    data: data,
  });
}
// 查询用户列表
export function getList(query) {
  return request({
    url: '/base/auth/user/page',
    method: 'get',
    params: query
  })
}

export function deleteThat(data) {
  return request({
    url: data,
    method: "delete",
  });
}
// 机组信息查询，分页列表
export function unitList(data) {
  return request({
    url: "/base/plant/unit/list",
    method: "get",
    params: data,
  });
}

// 新增 机组信息查询
export function addUnitList(data) {
  return request({
    url: "/base/plant/unit/insert",
    method: "post",
    data: data,
  });
}

// 修改 机组信息查询
export function updateUnitList(data) {
  return request({
    url: "/base/plant/unit/update",
    method: "post",
    data: data,
  });
}
// 批量删除 机组信息查询
export function deleteUnitList(data) {
  return request({
    url: "/base/plant/unit/deleteBatch?ids=" + data,
    method: "post",
  });
}
